package com.itheima.service.Impl;

import com.itheima.domain.User;
import com.itheima.mapper.UserMapper;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper mapper;


    public List<User> findAll() {
        return mapper.findAll();
    }

    public User findById() {
        return mapper.findById();
    }

    public void update(User user) {
        mapper.update(user);
    }

    public void delete(Integer id) {
        mapper.delete(id);
    }

    public void insert(User user) {
        mapper.insert(user);
    }


}
